import { createApp } from 'vue';
import App from './App.vue';
import './registerServiceWorker';
import router from './router';
import store from './store';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import './assets/style/common.scss';
import * as Icons from "@element-plus/icons-vue";
import zhCn from "element-plus/lib/locale/lang/zh-cn" //element-plus中文显示
import * as ECharts from 'echarts'
import directives from "@/views/instruct/copy/directives";

const app = createApp(App);

app.use(ElementPlus, {
  locale: zhCn
})

app.config.globalProperties.$ECharts = ECharts

Object.keys(Icons).forEach(key => {
  app.component(key, Icons[key as keyof typeof Icons]);
})

app.use(store).use(directives).use(router).use(ElementPlus).mount('#app')
